<!DOCTYPE html>
<html class="x-admin-sm">

<head>
  <meta charset="UTF-8">
  <title>后台管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
    content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
  <link rel="stylesheet" href="./css/font.css">
  <link rel="stylesheet" href="./css/xadmin.css">
  <script src="./lib/layui/layui.js" charset="utf-8"></script>
  <script type="text/javascript" src="./js/xadmin.js"></script>
</head>

<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <table class="layui-hide" id="adminList" lay-filter="adminList"></table>
        </div>
      </div>
    </div>
  </div>
</body>
<script>
  layui.use(['laydate', 'form', 'table'], function () {
    var laydate = layui.laydate;
    var form = layui.form;
    var table = layui.table;
    table.render({
      elem: '#adminList'
      , url: 'getAdminList'
      , id: "admin"
      , cols: [[
        { type: 'checkbox', fixed: 'left' }
        , { field: 'id', title: '管理员编号', sort: true, width: '15%' }
        , { field: 'name', title: '管理员姓名', width: '20%', }
        , { field: 'password', title: '管理员密码', width: '20%' }
        , {
          field: 'url', title: '管理员头像', width: '20%',
          templet: function (d) { return '<div ><img src=' + d.url + ' style="width: 50px;"></div>' }
        }
        , { field: 'phone', title: '管理员电话', width: '20%' }
      ]]
      , page: true
      , skin: 'row'
      , even: true
      , size: 'lg'
    });

  });
</script>

</html>